<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body></body>
  <script>
    var obj = { 0: 'a', 1: 'b', 2: 'c', length: 3 };
    Array.from(
      obj,
      function (value, index) {
        console.log(value, index, this, arguments.length);
        return value.repeat(3); //必须指定返回值，否则返回undefined
      },
      obj
    );
  </script>
</html>
